﻿
using Game;

namespace Mekiasm
{
    public class Cutter : ItemFlat
    {
        public static int Index;
        public Cutter() : base("板材切割剪刀", MekiasmInit.GetFlatTexture(MekiasmInit.R2, "cutter"))
        {
            
            
        }
        public override string GetDescription(int value)
        {
            return "绝缘修剪器的用途是增加或减少可绝缘的电缆。";
        }
        public override int GetBasePower()
        {
            return 60;
        }
        public override int GetMaxPower()
        {
            return 60;
        }
        public override float GetBlockHealth(int value)
        {
            SaveItemSystem.GetBlockData(value, out var data);
            if (data == null) return -1f;
            else return data.fuelAmount / (float)GetMaxPower();
        }

        public override int GetCraftedRemainValue(int value)
        {
            SaveItemSystem.GetBlockData(value, out var data);
            if (data != null)
            {
                return SaveItemSystem.ChangePower(value, -1);
            }
            return value;
        }

        public override int GetCraftedResultValue(int value)
        {
            return SaveItemSystem.StoreBlockData(value, GetMaxPower());
        }

    }
}
